<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
  <title>#(app_name??'EOVA低代码开发平台')</title>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <meta name="robots" content="noindex">
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  #include("/eova/_view/_block/base.html")
  <link rel="stylesheet" href="/eova/_view/index/login.css">
  <script type="text/javascript" src="/eova/ui/meta/eova.meta.js?v=1.2"></script>
  <script type="module" src="/eova/_view/index/login.js"></script>
  <script type="text/javascript">
      // 登录页关键词 EOVA-LOGIN
      if (window !== top) {
          parent.location.href = location.href;
      }
  </script>
</head>
<body>
<div id="app" v-cloak>
  <div class="eova-login">
    <h2>{{ conf.app_name || '账号密码登录' }}</h2>
    <form ref="refForm" @keyup.enter="onSubmit">
      <div class="eova-login_input">
        <input type="text" placeholder="账号" maxlength="30" v-model="data.login_id">
      </div>
      <div class="eova-login_input">
        <input type="password" placeholder="密码" maxlength="30" v-model="data.login_pwd">
      </div>
      <div class="eova-login_input eova-login_cap" v-if="conf.is_captcha === 'true'">
        <input type="text" maxlength="4" placeholder="验证码" autocomplete="off" v-model="data.captcha">
        <div style="margin-left: 10px;">
          <img src="/user/captcha" onclick="this.src='/user/captcha?'+Math.random()">
        </div>
      </div>
      <button type="button" @click="onSubmit()">登录</button>
      <span style="color: red" v-html="data.msg"></span>
    </form>
  </div>
  <div class="eova-footer">
    {{ conf.copyright }}
  </div>
</div>
<script>
    uzoo.vue.mountBefore = () => {
        console.log("page beforeMount...")
        // 初始化参数传递
        uzoo.app.data.value.login_id = '#(login_id)'
        uzoo.app.data.value.login_pwd = '#(login_pwd)'
        // 登录配置
        uzoo.app.conf.value.app_name = '#(app_name??'EOVA低代码开发平台')'
        uzoo.app.conf.value.is_captcha = '#(isCaptcha??false)'
        uzoo.app.conf.value.copyright = '#(copyright)'
    }
</script>
</body>
</html>